Properly handle autogenerated *config.ml files in builddir
authorHilko Bengen <bengen@debian.org>
Mon, 23 Dec 2019 11:46:43 +0000 (12:46 +0100)
committerHilko Bengen <bengen@debian.org>
Thu, 23 Jan 2020 14:10:24 +0000 (14:10 +0000)
Gbp-Pq: Name 0016-Properly-handle-autogenerated-config.ml-files-in-bui.patch

common/mlstdutils/Makefile.am
daemon/Makefile.am
ocaml-dep.sh.in
subdir-rules.mk
v2v/Makefile.am

index ba11c11a0daf8cbdde4116a990ef2a14e7b28d94..9b8e0bd768b432a5bec5d52d0dbbd7a11e88ff10 100644 (file)
@@ -141,7 +141,7 @@ check-valgrind:
        $(MAKE) VG="@VG@" check
 
 # OCaml dependencies.
-.depend: $(srcdir)/*.mli $(srcdir)/*.ml
+.depend: $(srcdir)/*.mli $(srcdir)/*.ml $(builddir)/guestfs_config.ml
        $(top_builddir)/ocaml-dep.sh $^
 -include .depend
 
index b755d3cc5bc4c62bcb23737b72e8e973c60b8a57..ba0c771d70a9902d487735a892a8d6e0cc1ab1cf 100644 (file)
@@ -379,7 +379,7 @@ camldaemon.o: $(OBJECTS)
            $(OBJECTS)
 
 # OCaml dependencies.
-.depend: $(srcdir)/*.mli $(srcdir)/*.ml
+.depend: $(srcdir)/*.mli $(srcdir)/*.ml $(builddir)/daemon_config.ml
        $(top_builddir)/ocaml-dep.sh $^
 -include .depend
 
index 9de8497fd0cb2368656aeaf31cf7d78b4cf55531..58d62547e74d875e5d9509760bf7a98d2f8da838 100755 (executable)
@@ -74,7 +74,7 @@ echo >> $output-t
     | sed \
           -e "s,@abs_top_srcdir@/${subdir},.,g" \
           -e "s,\B${srcdir_re}/\\([^ ]*[.]\\)\\(cm[^ ]*\\|o\\),\\1\\2,g" \
-          -e "s,\B${srcdir_re}/\\([^ /]*_config[.]ml\\),\\1,g" \
+          -e "s,\B${srcdir_re}/\\([^ /]*config[.]ml\\),\\1,g" \
           -e "s,@abs_top_srcdir@/\\([^ ]*[.]\\)\\(cm[^ ]*\\|o\\),${top_builddir}/\\1\\2,g" \
           -e 's,\(^\| \)./,\1,g' \
     >> $output-t
index 3a20cb10d289b45859b3032d0f84ae4053bf5bd1..5dbacb71984638e0097cad76244287d0f304db00 100644 (file)
@@ -83,9 +83,13 @@ guestfs_am_v_jar_0 = @echo "  JAR     " $@;
        $(guestfs_am_v_ocamlcmi)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
 %.cmo: $(srcdir)/%.ml
        $(guestfs_am_v_ocamlc)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
+%.cmo: $(builddir)/%.ml
+       $(guestfs_am_v_ocamlc)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
 if HAVE_OCAMLOPT
 %.cmx: $(srcdir)/%.ml
        $(guestfs_am_v_ocamlopt)$(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
+%.cmx: $(builddir)/%.ml
+       $(guestfs_am_v_ocamlopt)$(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
 endif
 
 # Test shell scripts should use '$TEST_FUNCTIONS' to get a predefined
index bb0a57f92a405ac41261ab477b88fbc38852d974..2e9880952644ef6a2c21e0be7fba1ead603116f9 100644 (file)
@@ -700,7 +700,7 @@ v2v_unit_tests_LINK = \
 .depend: \
        $(srcdir)/*.mli \
        $(srcdir)/*.ml \
-       $(srcdir)/config.ml \
+       $(builddir)/config.ml \
        $(srcdir)/output_rhv_upload_*_source.ml
        $(top_builddir)/ocaml-dep.sh $^
 -include .depend